package com.elminster.dao.impl;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Repository;

import com.elminster.dao.IViewDailyAccountDetailDao;
import com.elminster.dao.common.impl.GenericDaoImpl;
import com.elminster.entity.ViewDailyAccountDetial;

@Repository
public class ViewDailyAccountDetailDaoImpl extends 
        GenericDaoImpl<ViewDailyAccountDetial, Integer> 
        implements IViewDailyAccountDetailDao {

    private static final Log log = LogFactory.getLog(ViewDailyAccountDetailDaoImpl.class);
    // property constants
    public static final String USER_ID = "userId";
    
    public ViewDailyAccountDetailDaoImpl() {
        this(ViewDailyAccountDetial.class);
    }
    
    public ViewDailyAccountDetailDaoImpl(Class<ViewDailyAccountDetial> type) {
        super(type);
    }

    public List<ViewDailyAccountDetial> findByUserId(int userId) {
        log.debug("find by userId");
        return findByProperty(USER_ID, userId);
    }
}
